<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
    <title>添加新订单</title>
    <!--cdn连接-->
    <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css" />
    <!-- layui js -->
    <script src="https://www.layuicdn.com/layui/layui.js"></script>
    <!--jquery-->
    <script src="./jquery/jquery-3.3.1.js"></script>
    <!-- css -->
    <link rel="stylesheet" type="text/css" href="css/add-order.css">
    <!-- js -->
    <script src="./js/add-order.js"></script>
</head>
<body class="layui-layout-body">
    <div class="container">
        <!--搜索框-->
        <div class="layui-form" style="margin-top: 60px;">
            <div class="layui-form-item forward-search">
                <button class="layui-btn" type="button" lay-submit lay-filter="formDemo" id="key"><i class="layui-icon layui-icon-search"></i>
                </button>
                <div class="layui-input-inline">
                    <input type="text" name="keyword" id="keyword" required
                           lay-verify="text"
                           placeholder="请输入学员身份证号"
                           autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <!--新增表单-->
        <div class="addform">
            <div id="addInfo"></div>
        </div>
    </div>

    <!--数据模板-->
    <script type="text/html" id="addData">
        <div class="layui-form">
            {{#  if(d.status === 1){ }}
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend style="font-size: 22px;color: #009688">{{ d.dataInfo }}</legend>
                </fieldset><fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend style="font-size: 22px;color: #009688">添加新订单</legend>
        </fieldset>
            {{#  }else{ }}

                <div class="layui-form-item">
                    <label class="layui-form-label">学员姓名</label>
                    <div class="layui-input-block">
                        <input type="text" name="userName" value="{{d.userInfo.userName}}" readonly id="userName" lay-verify="required" lay-reqtext="学员姓名不能为空" autocomplete="off" class="layui-input">
                        <input type="text" name="user_id" value="{{d.userInfo.user_id}}" readonly id="user_id" hidden>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">身份证号</label>
                    <div class="layui-input-block">
                        <input type="text" name="idCardNumber" value="{{d.userInfo.idCard}}" id="idCardNumber" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">选购套餐</label>
                        <div class="layui-input-inline">
                            <select name="setmeal" id="setmeal" lay-filter="demo1">
                                <option value="{{d.setmealList[0].setmeal_id}}" selected>{{d.setmealList[0].setmName}}</option>
                                {{#  layui.each(d.setmealList, function(index, item){ }}
                                <option value="{{item.setmeal_id}}">{{item.setmName}}</option>
                                {{#  }) }}
                            </select>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">报名状态</label>
                        <div class="layui-input-inline">
                            <select name="bm001" id="bm001">
                                <option value="{{d.dictList[0].code}}" selected>{{d.dictList[0].showvalue}}</option>
                                {{#  layui.each(d.dictList, function(index, item){ }}
                                <option value="{{item.code}}">{{item.showvalue}}</option>
                                {{#  }) }}
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">共付金额</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="orderTotal" id="orderTotal" placeholder="0￥" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">已付金额</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="orderPaid" id="orderPaid" placeholder="0￥" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">预付金额</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="orderAdvance" id="orderAdvance" placeholder="0￥" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">截止日期</label>
                        <div class="layui-input-inline">
                            <input type="text" class="layui-input" id="date" placeholder="yyyyMMdd">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <button type="button" class="layui-btn layui-btn-fluid" lay-submit="" lay-filter="demo1">立即提交</button>
                </div>
            {{# } }}
        </div>
    </script>
</body>
</html>